<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<BreukTrainerOnline.Models.Leerling>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Leerlingen Kiezen
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Leerlingen Kiezen</h2>

    <%= Html.ValidationSummary("Toevoegen van leerlingen mislukt.") %>

    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Kies leerlingen</legend>
            <p>
                <label for="LeerlingID">Leerlingen: </label>
                <select id="LeerlingID" name="LeerlingID" multiple="multiple" style="height:113px;">
                     <% foreach (var item in Model) { %>
                            <option value="<%= Html.Encode(item.LeerlingID) %>"><%= Html.Encode(item.Naam)%></option>
                     <% } %>
                </select>
                <%= Html.ValidationMessage("LeerlingID", "*")%>
            </p>
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>
    
    <% using (Html.BeginForm()) {%>

        <fieldset>
            <legend>Kies klas</legend>
            <p>
                <label for="Klas">Leerlingen: </label>
                <select id="Klas" name="Klas" multiple="multiple" style="height:113px;">
                     <% foreach (var item in Model) { %>
                            <option value="<%= Html.Encode(item.LeerlingID) %>"><%= Html.Encode(item.Naam)%></option>
                     <% } %>
                </select>
                <%= Html.ValidationMessage("LeerlingID", "*")%>
            </p>
            <p>
                <input type="submit" value="Create" />
            </p>
        </fieldset>

    <% } %>

    <div>
        <%= Html.ActionLink("Naar details opdracht", "ViewOpdrachtDetails", new { id = ViewData["OpdrachtID"] })%>
    </div>

</asp:Content>

